This invention relates to a sound source data generating method employed for generating sound effects and background music (BGM), a recording medium in which information of such sound source data is recorded, and a sound source data processing device for generating sounds using the sound source data.
Conventionally, electronic musical instruments, game equipment and information processing devices, such as, personal computers, generate musical sounds and sound effects.
For generating the musical sounds or sound effects, signals like square wave signals, triangular wave signals and sine wave signals are supplied to plural preset frequency dividers with different frequency division ratios and duty ratios, and the individual sound source signals outputted from the frequency dividers, that is, so-called voices, are synthesized at a desired level.
For musical instruments, such as, piano and drum, the entire sound portion of a sound is divided into four sections, that is, attack, decay, sustain and release sections, so that the amplitude or the level of the signal in each section characteristically changes. To deal with the changes, so-called ADSR control is carried out to cause similar changes of the signal level of each voice.
In addition, for electronic musical instruments, a so-called FM sound source for frequency-modulating sine wave signals with sine wave signals of low frequency is known. Thus, various sound signals can be generated by fewer sound source data with modulation factors used as temporal functions.
It is to be noted that noise may be used as a sound source of sound effects.
Meanwhile, for executing a game program with game equipment or an information processing device like a personal computer, the start, stop and sound volume of sound effects and background music (BGM) to be generated are changed in real time in accordance with proceedings of the game program or operations of the game equipment and information processing device by a user.
The sound information for sound effects or BGM is adaptive differential PCM (so-called ADPCM) data which is produced by compressing digitally recorded various 16-bit digital data, then performing bit rate reduction of 4 bits or BRR encoding, and blocking the resulting data. The ADPCM data is sound data for fundamental waveform. That is, the game equipment and the information processing device are provided with a so-called PCM sound source using the sound source data for generating musical intervals with the read-out cycle of the sound source data in response to indicated musical intervals.
The sound source data in a case where 4-bit ADPCM data is used as sound information will now be described in detail with reference to FIG. 6.
This sound source data is constituted on the basis of a block having 9 bytes composed of 8 horizontal bits and 9 vertical bits. The block is constituted by a 1-byte header information area HA consisting of additional information of the sound source data and an 8-byte sound data area SA consisting of 16 samples of sound source data or so-called sound data.
The header information area HA is constituted by 1-bit block end information ED, 1-bit loop information LP, filter information FL used for decoding, and a 4-bit shift amount RA.
The block end information ED indicates whether the block is the last block of the sound source data or not. The loop information LP indicates whether the sound data of the block is to be looped or not. When 1 is raised for the loop information LP, the sound data is looped. When 0 is raised for the loop information LP, the data is not looped.
BRR encoding is performed when the sound source data for each block is generated. The filter information FL indicates information of a filter to be used for performing BRR decoding corresponding to BRR encoding. With this filter information FL, a fixed predictive filter which is optimum for each block, that is, a fixed predictive filter having least errors, is selected from plural fixed predictive filters.
The shift amount RA is a parameter for expanding a 4-bit value to a 16-bit value in BRR decoding.
The sound data area SA includes 16 samples of sound data SD.sub.AOL to SD.sub.B3H.
Meanwhile, since 1 block consists of 9 bytes in the conventional sound source data, it requires complex BRR decoding.
Also, among optical discs employed for optically recording and reproducing data, a CD-ROM using a compact disc (CD) which is a read-only optical disc as a read-only memory has been recently used as a recording medium for recording sound source data. Therefore, it is preferred that the sound source data is based on the standard of CD-ROM pictures and sound source data, that is, CD-ROM XA.
Although the sound source data in which 1 block consists of 9 bytes has a block length consisting of 16 samples of sound data, this block length is not based on the CD-ROM XA standard. Therefore, the predictive filter employed for BRR encoding for generating the conventional sound source data differs from a predictive filter employed for BRR encoding for generating the sound source data based on the CD-ROM XA standard. In addition, since the predictive filter corresponding to BRR encoding is employed in performing BRR decoding of the sound source data, the predictive filter for the sound source data based on the CD-ROM XA standard cannot be used for decoding the conventional sound source data.
Further, since the loop information in the header information area of the sound source data simply indicates whether the sound data is to be looped or not, the control for looping of the sound source data becomes complex.
In view of the foregoing, it is an object of the present invention to provide a sound source data generating method for generating sound source data based on the CD-ROM XA standard in which simple processing suffices for generating sounds, a recording medium for recording the sound source data generated by the sound source data generating method, and a sound source data processing device for generating sounds using the sound source data generated by the sound source data generating method.
Meanwhile, when the sound output synthesized by the conventional PCM sound source is used for sound effects during a game program, the sound output is outputted in most cases with an overlap with musical tunes like BGM. In this case, it is necessary to mix the sound output for the sound effects with the musical tunes like BGM for outputting. Since a sound signal outputted from other processing circuit than the PCM sound source is used as the sound signal to be mixed, mixing of the sound output with the sound signal is complex. Also, the circuit structure therefor is enlarged.
Thus, in view of the foregoing, it is an object of the present invention to provide a sound data processing device which is capable of easily mixing the sound output synthesized from the sound source data with the sound signal.
According to the present invention, there is provided a sound source data generating method including the steps of: generating 14-byte sound information consisting of 28 samples of 4-bit adaptive differential PCM data; and generating 2-byte sound source parameters consisting of start information and end information of a looping section, predictive filter information expressing the type of an adaptive differential PCM predictive filter, and range information for expanding the 4-bit adaptive differential PCM data to 16-bit data, to generate 16-byte sound source data based on complete blocks from the 14-byte sound information and the 2-byte sound source parameters.
According to the present invention, there is also provided a recording medium having recorded therein 16-byte sound source data based on complete blocks, the 16-byte sound source data being constituted by 14-byte sound information consisting of 28 samples of 4-bit adaptive differential PCM data, and by 2-byte sound source parameters consisting of start information and end information of a looping section, predictive filter information expressing the type of an adaptive differential PCM predictive filter, and range information for expanding the 4-bit adaptive differential PCM data to 16-bit data.
According to the present invention, there is also provided a sound source data processing device including: memory means for storing therein 16-byte sound source data based on complete blocks which is constituted by 14-byte sound information consisting of 28 samples of 4-bit adaptive differential PCM data, and by 2-byte sound source parameters consisting of start information and end information of a looping section, predictive filter information expressing the type of an adaptive differential PCM predictive filter, and range information for expanding the 4-bit adaptive differential PCM data to 16-bit data; and decoding means for decoding the 4-bit adaptive differential PCM data in the block to 16-bit data using the predictive filter information and rate information of the sound source data based on blocks stored in the memory means.
The start information and the end information of the looping section are information indicating a start block and an end block respectively of a looping section composed of one or more blocks.
According to the present invention, there is provided a sound data processing device including: envelope means for providing an envelope for enclosing sound source data consisting of 4-bit adaptive differential PCM data and sound data which is 16-bit PCM data different from the sound source data; and sound output means for decoding the sound source data read out from the envelope means to perform pitch conversion and outputting sounds with a signal level controlled; and mixing means for mixing a sound output from the sound output means with the real sound data read out from the envelope means.
The sound data processing device according to the present invention further includes: second mixing means for mixing the real sound data with the sound output from the sound output means; and reverberation sound data mixing means for mixing sound data from the second mixing means, temporally shifted forward or backward, with the sound data from the mixing means.
In the present invention, the sound source data and the real sound data are enclosed in an envelope, and the 16-bit sound output generated from the sound source data which is the 4-bit adaptive differential PCM data and the 16-bit PCM data which is the real sound data different from the sound source data are arbitrarily mixed.
Also, in the present invention, the second mixing means is provided so that the sound data mixed by the second mixing means is temporally shifted and mixed with the sound data from the mixing means to generate the reverberation sound data.
In the present invention, since the sound information has a structure of 28 samples similar to that of CD-ROM XA, a predictive filter employed in the CD-ROM XA encoding device may be used for encoding the sound information. Also, as the block is set to 16 bytes, decoding may be easily carried out.
In addition, as the information indicating the start block and the end block of the looping section is provided in each block, looping of plural blocks may be performed.